#!/bin/bash
file_name=$(cat /tmp/2022.02.log)

for file in $file_name;do
    /usr/bin/wget -t 20 -T 300 -P /tmp/2022.02 -c https://pic-img.wenwo.com/fimg/$file
    # 检查 wget 命令的返回代码
    if [ $? -ne 0 ]; then
        echo "wget 命令执行失败: $file" >>/tmp/wget.2022.02.log
        break # 命令失败时跳出循环
    else
        echo "wget 命令执行成功: $file" >>/tmp/wget.2022.02.log
    fi
done

echo ""
echo "脚本运行完成！" >>/tmp/wget.2022.02.log